<template>
  <div class="tab">
    <cube-tab-bar
      v-model="selectedLabelDefault"
      :data="tabs"
      :useTransition=false
      :showSlider=true
      @click="clickHandler"
      @change="changeHandler"
    ></cube-tab-bar>
  </div>
</template>

<script>
export default {
  name: 'Tab',
  data () {
    return {
      selectedLabelDefault: '商品',
      tabs: [
        {
          label: '商品'
        },
        {
          label: '评价'
        },
        {
          label: '商家'
        }
      ]
    }
  },
  methods: {
    clickHandler (label) {
      console.log(label)
    },
    changeHandler (label) {}
  }
}
</script>

<style lang='stylus' scoped>
  @import "~styles/stylus/variable"
  .tab
    display: flex
    flex-direction: column
    height: 100%
    >>> .cube-tab
      padding: 10px 0
    .slide-wrapper
      flex: 1
      overflow: hidden
</style>
